package
{
  import flash.display.Sprite;
  
  // stores an entry in one of the 11 color containers which contains the chip number,
  // the count in the parent container, and links to other containers and the corresponding
  // index that this color also resides in
  
  public class ColorEntry
  {
    private var _chip_num:int;
    private var _count:int;
    private var _neighbors:Array;
    
    
    /* Constructor */
    public function ColorEntry(chip_num:int, count:int)
    {
      this._chip_num = chip_num;
      this._count = count;
      this._neighbors = new Array();
    }
    
    public function addNeighbor(color:String, index:int):void
    {
      var neighbor:Neighbor = new Neighbor(color, index);
      _neighbors.push(neighbor);
    }
    
    public function getCount():int{
      return this._count;
    }
    
    public function getChipNum():int{
      return this._chip_num;
    }
    
    public function getNumNeighbors():int{
      return this._neighbors.length;
    }
    
    public function getNeighborAt(index:int):Neighbor{
      return this._neighbors[index] as Neighbor;
    }
    
  }
  
}